package com.pactera.chatRoom.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.pactera.chatRoom.dao.PersonDao;
import com.pactera.chatRoom.entity.Person;

@Service
public class PersonServcie {
	
	@Resource
	PersonDao personDao;
	
	public List<Person> getOnlinePerson(){
		
		List<Person> personList = personDao.getOnlinePerson();
		
		return personList;
	}
	
	public int Register(Person person) {
		
		int num = personDao.save(person);
		
		return num;
	}
	
	

}
